package com.deryun.tyl.dao.impl;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;

import com.deryun.tyl.bean.News;
import com.deryun.tyl.bean.mapper.NewsMapper;

public class NewsDaoImpl extends SqlSessionDaoSupport{
	
	@Autowired
	private NewsMapper newsMapper;
	
	public List<News> getAllNews(){
		return newsMapper.getAllNews();
	}
	
	
	public int addNews(News news){
		return newsMapper.addNews(news);
	}
	
	
	public int deleteNews(int id){
		return newsMapper.deleteNews(id);
	}
}
